package com.zbest.zpay.acctrans.common.util;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;

import com.zbest.zpay.acctrans.common.exception.AccTransRuntimeException;
import com.zbest.zpay.acctrans.enums.biz.AcctransBizCode;

public abstract class CommonUtils {

    private static Logger logger = LoggerFactory.getLogger(CommonUtils.class);

    private CommonUtils() {
    }

    public static void copyProperties(Object source, Object target) {
        try {
            BeanUtils.copyProperties(source, target);
        } catch (Exception e) {
            logger.error("copyProperties", e);
            throw new AccTransRuntimeException(
                    AcctransBizCode.SYSTEM_CLASS_CONVERT_ERROR, e);
        }
    }

}
